
module.exports = app=>{
    const {STRING} = app.Sequelize;
    const Haha = app.model.define('haha',{
        project_name:{
            type:STRING,
            comment:'项目名称'
        },
        name:{
            type:STRING,
            comment:'名字'
        },
    })
    Haha.associate = function () {
        app.model.Haha.belongsTo(app.model.Info, {
          foreignKey: 'project_name',
          targetKey:'info_name'
        })
    }
    return Haha
}